﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity;
using Iacym.Entities;

namespace Iacym.Repository.Mapping
{
    public class IDIOMAMap : EntityTypeConfiguration<IDIOMA>
    {
        public IDIOMAMap()
        {
            this.HasKey(p => p.Id);

            this.Property(p => p.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.Property(p => p.Descripcion).HasMaxLength(30).IsRequired();



            this.ToTable("IDIOMA");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Descripcion).HasColumnName("Descripcion");
        }

    }
}
